package com.luguangtao.dao;

import com.luguangtao.entity.Student;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

//学生类接口
@Repository
public interface StudentDao extends PagingAndSortingRepository<Student,Long> {
    //根据名称查询
    List<Student> findByNameLike(String name);
    //根据年龄大于20岁查询
    List<Student> findByAgeGreaterThan(Integer age);
}
